<template>
	<view>
		<u-navbar title="乘客选择" back-icon-size='44' :background="background" title-color="#FFFFFF" :border-bottom='false'
			back-icon-color='#071D42'></u-navbar>
		<view class="header">
			<view class="peoBox">
				<view class="tools">
					<view class="tools-item">
						<u-icon name="scan" color="#3587F7" size="32"></u-icon>
						<text>扫描证件</text>
					</view>
					<view class="tools-item" @click="navTo('./editPass?type=1')">
						<u-icon name="plus-circle" color="#3587F7" size="32"></u-icon>
						<text>新增乘客</text>
					</view>
				</view>
				<view class="peo-ul">
					<view class="peo-li" v-for="item in list">
						<view class="edit" @click="navTo('./editPass?type=2')">
							<u-icon name="edit-pen" color="#3587F7" size="32"></u-icon>
						</view>
						<view class="peoInfo">
							<view class="name">
								<view class="name-tit" :style="{color:checked?'#3587F7':'#333333'}">
									小桌子
								</view>
								<view class="type" :style="{color:checked?'#3587F7':'#999999',borderColor:checked?'#3587F7':'#999999'}">
									成人票
								</view>
							</view>
							<view class="idnum" :style="{color:checked?'#3587F7':'#999999'}">
								二代身份证 123568 ******** 2356
							</view>
						</view>
						<view class="check">
							<u-checkbox v-model="checked"></u-checkbox>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				checked: false,
				background: {
					backgroundColor: '#3DA4FE'
				},
				list: [1, 2, 3, 4, 5]
			}
		},
		methods:{
			navTo(url){
				uni.navigateTo({
					url:url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.header {
		width: 100%;
		height: 558rpx;
		background: linear-gradient(180deg, #3DA4FE 0%, #3587F7 72%, rgba(45, 123, 247, 0) 100%);

		.peoBox {
			width: 694rpx;
			height: auto;
			background: #FFFFFF;
			border-radius: 16rpx;
			margin: 0 auto;

			.tools {
				width: 100%;
				height: 132rpx;
				display: flex;
				align-items: center;
				justify-content: space-around;

				.tools-item {
					width: 296rpx;
					height: 76rpx;
					background: #F4F7FE;
					border-radius: 40rpx;
					line-height: 76rpx;
					text-align: center;

					text {
						font-size: 30rpx;
						font-family: Segoe UI;
						font-weight: bold;
						color: #3587F7;
						margin-left: 5rpx;
					}
				}
			}

			.peo-ul {
				padding: 0 20rpx;

				.peo-li {
					width: 100%;
					height: 120rpx;
					display: flex;
					align-items: center;
					border-bottom: 2rpx solid #F2F2F7;

					&:last-child {
						border-bottom: none
					}

					.peoInfo {
						margin-left: 28rpx;

						.name {
							display: flex;
							align-items: center;

							.name-tit {
								font-size: 32rpx;
								font-family: Segoe UI;
								font-weight: bold;
								color: #333333;
							}

							.type {
								margin-left: 10rpx;
								width: fit-content;
								height: 38rpx;
								background: #FFFFFF;
								border: 2rpx solid #D0D2D5;
								border-radius: 4rpx;
								font-size: 20rpx;
								font-family: Segoe UI;
								font-weight: 400;
								color: #999999;
								text-align: center;
								padding: 0 10rpx;
							}
						}

						.idnum {
							margin-top: 4rpx;
							font-size: 24rpx;
							font-family: Segoe UI;
							font-weight: 400;
							color: #999999;
						}
					}
	
					.check {
						margin-left: auto;
					}
				}
			}
		}
	}

	/deep/ .u-checkbox__label {
		margin-right: 0rpx !important;
	}
</style>
